# test

PROJECT(Test)

IF(MSVC)
  ADD_DEFINITIONS(-D_USRDLL)
ENDIF()

FILE(GLOB sources "*.cpp")
FOREACH(source ${sources})
  GET_FILENAME_COMPONENT(ExeName ${source} NAME_WE)
  ADD_EXECUTABLE(${ExeName} ${source})
  MESSAGE("Auto loading unit test ${ExeName}")
  TARGET_LINK_LIBRARIES(${ExeName} gtest.lib gtest_main.lib myframework)

  IF(MSVC)
    SET_TARGET_PROPERTIES(${ExeName} PROPERTIES PREFIX "../")
    SET_TARGET_PROPERTIES(${ExeName} PROPERTIES IMPORT_PREFIX "../")
  ENDIF(MSVC)
ENDFOREACH()

SET(EXECUTABLE_OUTPUT_PATH ${GLOBAL_OUTPUT_PATH})
SET(LIBRARY_OUTPUT_PATH ${GLOBAL_OUTPUT_PATH})

